╥╗╨⌐▒╚╠╪╛½┴Θ╧α╣╪╡─╘┤┤·┬δ


▒╚╠╪╛½┴Θv2.1╡─╢α╢╦┐┌╖■╬±╞≈▓σ╝■tracker.dll╡─╘┤┤·┬δ

// Tracker.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}

extern "C" DWORD __stdcall TranslateTracker(const char* pTracker, int pnPort[], DWORD dwMax)
{
DWORD dwRet = 0;
/*check params*/
if(pTracker==NULL||pnPort==NULL||dwMax==0)return 0;
if(stricmp(pTracker,"bt.eastgame.net")==0)
{//6969,81,82,8080
pnPort[dwRet++] = 6969; if(dwRet>=dwMax)return dwRet;
pnPort[dwRet++] = 81; if(dwRet>=dwMax)return dwRet;
pnPort[dwRet++] = 82; if(dwRet>=dwMax)return dwRet;
pnPort[dwRet++] = 8080; if(dwRet>=dwMax)return dwRet;
}
else if(stricmp(pTracker,"bt.gamesir.com")==0)
{//6969,8080
pnPort[dwRet++] = 6969; if(dwRet>=dwMax)return dwRet;
pnPort[dwRet++] = 8080; if(dwRet>=dwMax)return dwRet;
}
else if(stricmp(pTracker,"btfans.3322.org")==0)
{//6969,8000
pnPort[dwRet++] = 6969; if(dwRet>=dwMax)return dwRet;
pnPort[dwRet++] = 8000; if(dwRet>=dwMax)return dwRet;
}
return dwRet;
}




BS2.0FINAL╫╘┤°╡─┐╔╙├─┌┤µ╗╪╩╒╣ñ╛▀MemFree.exe╡─╘┤┤·┬δ

// MemFree.cpp : Defines the entry point for the application.
//

#include "stdafx.h"

/*return the operation should be persumed*/
const int MemCount = 400;
const int BlockSize = 10L * 1024 * 1024;
int CalcMemory()
{
MEMORYSTATUS mms;
memset(&mms,0,sizeof(mms));
mms.dwLength = sizeof(mms);
GlobalMemoryStatus(&mms);
mms.dwTotalPhys /= BlockSize;
mms.dwTotalPhys = mms.dwTotalPhys * 2 / 3 + 2; //
return (mms.dwTotalPhys==0||mms.dwTotalPhys>=MemCount) ? 15 : (int)mms.dwTotalPhys;
}
void DoFreeMemory()
{
int nToDo = CalcMemory();
int nCount = 0;
char* ppMem[MemCount+1];
char* pTmp;
/*init pointer to zero*/
memset(ppMem,0,sizeof(char*) * MemCount);
/*alloc memory*/
while(nCount<nToDo)
{
pTmp = new char[BlockSize];
if(pTmp==NULL)break;
ppMem[nCount++] = pTmp;
memset(pTmp,0,BlockSize);
Sleep(200);
}
/*free memory*/
nCount = 0;
while(nCount<nToDo)
{
if(ppMem[nCount])delete[] ppMem[nCount];
nCount++;
}
/*job done!*/
}

int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
HANDLE hFreer = CreateMutex(NULL,FALSE,"BitSpirit - Memory - Freer");
if(hFreer==NULL||GetLastError()==ERROR_ALREADY_EXISTS)return 1;//failed or engaged
DoFreeMemory();
CloseHandle(hFreer);
return 0;
}